<script setup lang="ts">
  import ProjectItem from './project-item.vue'
  const props = defineProps({
    record: {
      type: Object,
      default: {}
    },
  })
</script>


<template>
  <view class="projects c1 fs30 fw400" v-if="(record.status == 0 || record.status == 1) && record.detailList">
    <view v-for="(i, index) in record.detailList" :key="index">{{ i.repairItem }} <text v-if="record.detailList.length-1 != index"> |  </text> </view>
  </view>
  <view class="projects-end" v-if="record.status == 2 && record.detailList">
    <ProjectItem v-for="(item, index) in record.detailList" :key="index" :proItem="item" :proIndex="index" />
    <view class="line"></view>
    <ve-cell-price label="合计" :value="record.repairAmount" priceAlign="right" style="margin: 8rpx 0 0;"></ve-cell-price>
  </view>
</template>


<style lang="scss" scoped>
  .projects{
    width: 100%;padding: 32rpx 24rpx;background: #F7F8FA;display: flex;justify-content: flex-start;align-items: center;flex-wrap: wrap;
    text{
      margin-right: 12rpx;
    }
  }
  .projects-end{
    width: 100%;background: #F7F8FA;padding: 0 24rpx;
    .line{
      width: 100%;height: 2rpx;background: rgba(216, 216, 216, 0.3);
    }
  }
</style>
